package com.wz.jiangsu.main.stu;

public class TestFac {

    public static   Animaa getObject(String name) {
        Animaa obj = null;
        switch (name) {
            case "dog":
                obj = new Dogimpl();
                break;
            case "cat":
                obj = new Catimpl();
                break;
            default:
                System.out.println("输入的不合法");
        }

        return obj;
    }

}
